package com.nchu.commondevelopmentframework.dto;

import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @className: UserDTO
 * @description: 用户数据传输对象
 * @author: Li Chuanwei
 * @date: 2024/01/20 16:53
 * @Company: Copyright [日期] by [作者或个人]
 **/
@Data
public class UserDTO {
    @NotEmpty(message = "userName cannot be empty")
    @Length(min = 2, max = 10, message = "userName length must be between 2 and 10")
    private String userName;

    @NotEmpty(message = "password cannot be empty")
    @Length(min = 6, max = 16, message = "password length must be between 6 and 16")
    private String password;
}
